<template>
  <div class="container">
<!--    <div class="row">-->
<!--      <div class="col-12">-->
<!--        <form ref="textareaform" @submit.prevent="form" class="container">-->
<!--          <div class="row">-->
<!--            <div class="col mx-auto login-box">-->
<!--              <div class="input-box">-->
<!--                <div>-->
<!--                  <label class="control-label">Select your private key (key.p12)</label>-->
<!--                  <file-selector-->
<!--                    v-model="keystorePath"-->
<!--                    :placeholder="keystorePath"-->
<!--                    action="SelectFile"-->
<!--                  />-->
<!--                </div>-->
<!--                <div>-->
<!--                  <fg-input-->
<!--                    style="margin-bottom: 0.125em"-->
<!--                    type="text"-->
<!--                    label="Key Alias"-->
<!--                    v-model="alias"-->
<!--                    :placeholder="alias"-->
<!--                  />-->
<!--                </div>-->
<!--                <div>-->
<!--                  <password-input-->
<!--                    v-model="keystorePassword"-->
<!--                    label="Keystore Password"-->
<!--                    :validate=false-->
<!--                  />-->
<!--                </div>-->
<!--                <div>-->
<!--                  <password-input-->
<!--                    v-model="KeyPassword"-->
<!--                    label="Key Password"-->
<!--                    :validate=false-->
<!--                  />-->
<!--                </div>-->
<!--              </div>-->
<!--              <div class="button-box">-->
<!--                <div class="container">-->
<!--                  <div class="row">-->
<!--                    <div class="col">-->
<!--                      <p-button type="primary" block @click.native="login()">-->
<!--                        <span style="display: block;"> LOGIN</span>-->
<!--                      </p-button>-->
<!--                    </div>-->
<!--                  </div>-->
<!--                  <div class="row">-->
<!--                    <div class="col">-->
<!--                      <p class="text-right">Don't have a wallet yet? Create one <a href="javascript:void(0)" @click="newWallet()">here!</a></p>-->
<!--                    </div>-->
<!--                  </div>-->
<!--                </div>-->
<!--              </div>-->
<!--            </div>-->
<!--          </div>-->
<!--        </form>-->
<!--      </div>-->
<!--    </div>-->
    <page-overlay text="Loading..." :isActive="overlay" />
  </div>
</template>

<script setup lang="ts">

import {onMounted, ref} from "vue";
import {useRouter} from 'vue-router'
const Router = useRouter()

const overlay = ref(false)
const login = ()=>{
  window.go.backend.App.Login().then(result=>{
    if(result){
      Router.push({
        path:'/home'
      });
    }
  })
}
onMounted(()=>{
  login()
})

</script>

<style scoped lang="scss">
.login-box {
  max-width: 29rem;
  min-width: 29rem;
  padding-bottom: 2rem;
}

.input-box > div {
  margin-bottom: 1.875em;
}

.button-box .container {
  margin-left: 0em;
  margin-right: 0em;
  padding-left: 0em;
  padding-right: 0em;
}

.button-box .container .row {
  margin-left: 0em;
  margin-right: 0em;
  padding-left: 0em;
  padding-right: 0em;
  margin-top: 1.25em;
}

.button-box .container .row [class^="col"] {
  margin-left: 0em;
  margin-right: 0em;
  padding-left: 0em;
  padding-right: 0em;
}
</style>
